import http from '../util/request.js'
export default {
    add:(obj)=>{
        return http({
            url:'/api/product_size',
            method:'post',
            data:obj,
            headers: {
                'Content-Type': 'application/json'
            }
        });
    },
    del: (id) => {
        return http({
            url: '/api/product_size/' + id,
            method: 'delete'
        });
    },
    edit:(obj)=>{
        return http({
            url: `/api/product_size`,
            method: 'put',
            data: obj,
            headers: {
                'Content-Type': 'application/json'
            }
        });
    },
    page:(params)=>{
        return http({
            url: '/api/product_size/page',
            method: 'get',
            params: params,
        });
    },
    all:(obj)=>{
        return http({
            url: '/api/product_size/list',
            method: 'get',
            params: obj
        });
    },
    batchAdd: (list) => {
        return http({
            url: '/api/product_size/batch',
            method: 'post',
            data: list,
            headers: { 'Content-Type': 'application/json' }
        });
    },

}
